package com.cxb.springboot.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener;
import org.apache.curator.framework.recipes.cache.TreeCacheEvent;
import org.apache.curator.framework.recipes.cache.TreeCacheListener;

/**
 * @Classname ZookeeperWatcherListener
 * @Date 2023/3/28 23:11
 * @Created by Administrator
 * @Description PathChildrenCache：监听指定节点的子节点
 */
@Slf4j
public class MyTreeCacheListener implements TreeCacheListener {

    @Override
    public void childEvent(CuratorFramework client, TreeCacheEvent event) throws Exception {
        log.info("监听MyTreeCacheListener：{}", event);
    }
}